package me.qu42.zpage.net;

import java.io.File;
import java.net.URLEncoder;
import java.util.List;
import org.apache.http.NameValuePair;

public class PostParameter implements NameValuePair, java.io.Serializable, Comparable{

    String name;
    String value;
    

    public PostParameter(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public PostParameter(String name, double value) {
        this.name = name;
        this.value = String.valueOf(value);
    }

    public PostParameter(String name, int value) {
        this.name = name;
        this.value = String.valueOf(value);
    }
    
    public String getName(){
        return name;
    }
    public String getValue(){
        return value;
    }

    @Override
    public int compareTo(Object o) {
        int compared;
        PostParameter that = (PostParameter) o;
        compared = name.compareTo(that.name);
        if (0 == compared) {
            compared = value.compareTo(that.value);
        }
        return compared;
    }

}
